<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
@include('base.head')
<body class="antialiased">
    <form method="POST" action="{{ route('servers.add') }}">
        @csrf

        <div class="text-center">
            <x-bladewind.input name="port"  required="true" placeholder="port" />
        </div>

        @error('port')
        <x-bladewind.alert
            type="error">
            {{ $message }}
        </x-bladewind.alert>
        <br>
        @enderror

        <div class="text-center">
            <x-bladewind.input name="ip" required="true" placeholder="ip" />
        </div>

        @error('ip')
        <x-bladewind.alert
            type="error">
            {{ $message }}
        </x-bladewind.alert>
        <br>

        @enderror<div class="text-center">
            <x-bladewind.input name="name" required="true" placeholder="name" />
        </div>

        @error('name')
        <x-bladewind.alert
            type="error">
            {{ $message }}
        </x-bladewind.alert>
        <br>
        @enderror

        @foreach($connections as $connection)
            <x-bladewind::checkbox  name="connections[]" value="{{ $connection->connection }}" label="{{ $connection->connection }}"/>
        @endforeach

        @error('connections')
        <x-bladewind.alert
            type="error">
            {{ $message }}
        </x-bladewind.alert>
        <br>
        @enderror

        <x-bladewind.button
            name="btn-save"
            has_spinner="true"
            type="primary"
            can_submit="true"
            class="mt-3">
            Создать сервер
        </x-bladewind.button>

    </form>
</body>
</html>
